package com.jasonzhou.onetomanycontrol.constant

import java.util.*

enum class CHAR_ID {
    SERVICE, CONFIG, FF1, FF2, FF3, FF4, FF5, FF6, FF7, FF8, FF9, FFA, FFB;

    companion object {
        /**
         * 服务通道ID
         */
        val UUID_BLE_SERVICE = UUID.fromString("0000FFF0-0000-1000-8000-00805f9b34fb")

        /**
         * 设备描述
         */
        private val CLIENT_CHARACTERISTIC_CONFIG =
            UUID.fromString("00002902-0000-1000-8000-00805f9b34fb")

        private val UUID_FF1_BLE = UUID.fromString("0000FFF1-0000-1000-8000-00805f9b34fb")
        private val UUID_FF2_BLE = UUID.fromString("0000FFF2-0000-1000-8000-00805f9b34fb")
        private val UUID_FF3_BLE = UUID.fromString("0000FFF3-0000-1000-8000-00805f9b34fb")
        private val UUID_FF4_BLE = UUID.fromString("0000FFF4-0000-1000-8000-00805f9b34fb")
        private val UUID_FF5_BLE = UUID.fromString("0000FFF5-0000-1000-8000-00805f9b34fb")
        private val UUID_FF6_BLE = UUID.fromString("0000FFF6-0000-1000-8000-00805f9b34fb")
        private val UUID_FF7_BLE = UUID.fromString("0000FFF7-0000-1000-8000-00805f9b34fb")
        private val UUID_FF8_BLE = UUID.fromString("0000FFF8-0000-1000-8000-00805f9b34fb")
        private val UUID_FF9_BLE = UUID.fromString("0000FFF9-0000-1000-8000-00805f9b34fb")
        private val UUID_FFA_BLE = UUID.fromString("0000FFFa-0000-1000-8000-00805f9b34fb")
        private val UUID_FFB_BLE = UUID.fromString("0000FFFb-0000-1000-8000-00805f9b34fb")

        val UUID_MAP = mutableMapOf(
            SERVICE to UUID_BLE_SERVICE,
            CONFIG to CLIENT_CHARACTERISTIC_CONFIG,
            FF1 to UUID_FF1_BLE,
            FF2 to UUID_FF2_BLE,
            FF3 to UUID_FF3_BLE,
            FF4 to UUID_FF4_BLE,
            FF5 to UUID_FF5_BLE,
            FF6 to UUID_FF6_BLE,
            FF7 to UUID_FF7_BLE,
            FF8 to UUID_FF8_BLE,
            FF9 to UUID_FF9_BLE,
            FFA to UUID_FFA_BLE,
            FFB to UUID_FFB_BLE
        )

    }
}